package com.wgts.wgts.localbean;

import android.os.Parcel;
import android.os.Parcelable;

import com.wgts.wgts.netmodle.resp.AllClassTypeEntity;

import java.util.ArrayList;

public class LocalSecondClass implements Parcelable{

    public String typeName;
    public String typeId;
    public String typeImage;
    public ArrayList<LocalThreeClass> subTypes;

    protected LocalSecondClass(Parcel in) {
        typeName = in.readString();
        typeId = in.readString();
        typeImage = in.readString();
        subTypes = in.createTypedArrayList(LocalThreeClass.CREATOR);
    }

    public static final Creator<LocalSecondClass> CREATOR = new Creator<LocalSecondClass>() {
        @Override
        public LocalSecondClass createFromParcel(Parcel in) {
            return new LocalSecondClass(in);
        }

        @Override
        public LocalSecondClass[] newArray(int size) {
            return new LocalSecondClass[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(typeName);
        dest.writeString(typeId);
        dest.writeString(typeImage);
        dest.writeTypedList(subTypes);
    }
}
